package org.chen.common.hotel.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Valid
public class CustomAttractionDTO {
    @Schema(description = "景点名称", example = "春熙路")
    @NotBlank(message = "景点名称不能为空")
    @Size(max = 100, message = "景点名称长度不能超过100个字符")
    private String name;

    @Schema(description = "纬度", example = "30.6598")
    @NotNull(message = "纬度不能为空")
    @DecimalMin(value = "-90.0", message = "纬度范围应在-90到90之间")
    @DecimalMax(value = "90.0", message = "纬度范围应在-90到90之间")
    private BigDecimal latitude;

    @Schema(description = "经度", example = "104.0633")
    @NotNull(message = "经度不能为空")
    @DecimalMin(value = "-180.0", message = "经度范围应在-180到180之间")
    @DecimalMax(value = "180.0", message = "经度范围应在-180到180之间")
    private BigDecimal longitude;
}